<!-- BEGIN: MAIN -->
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<TITLE>{site_title}{title}</TITLE>
<link rel="stylesheet" href="../{theme}/css/template_css.css" type="text/css" />
<link rel="stylesheet" href="../{theme}/css/theme.css" type="text/css" />
<script language="JavaScript" type="text/JavaScript">
function onlyNumber()
{
	if((event.keyCode<48)||(event.keyCode>57))
	event.returnValue=false;
}
function del_image(val){
	if(confirm('Are you sure you want delete this image?')==true){
		location.href = 'galleryDelete.php?img='+val;
	}
}
function check_form(val){
	var frm = document.frmData;
	if (frm.gallery_name.value==""){
		alert('Bạn phải nhập Tên');
		frm.gallery_name.focus();
		return;
	}
	if (frm.gallery_position.value==""){
		alert('Bạn phải nhập Vị trí!');
		frm.gallery_position.focus();
		return;
	}
	frm.act.value=val;
	frm.target = "fr_submit";
	frm.submit();
}
function load_focus(){
	document.frmData.gallery_name.focus();
}
</script>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="javascript: load_focus();">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px;">
  <tr> 
    <td width="100%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr bgcolor="#F1F3F5"> 
          <td width="2" valign="top"></td>
          <td colspan="2" valign="top"><table width="100%" border="0" cellspacing="1" cellpadding="0">
              <tr> 
                <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0"  class="adminheading">
                    <tr bgcolor="#EFEFEF"> 
                      <th>{title}</th>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td height="420" valign="top"> 
			   <form name="frmData" method="post" action="galleryAction.php" enctype="multipart/form-data">
			   <input name="sub_mit" type="hidden"  value="yes">
			   <input type="hidden" name="page" value="{page}">
			   <input type="hidden" name="type" value="{type}">
			   <input type="hidden" name="act" value="">
			   <input name="ID" type="hidden"  value="{id}">
			   <input name="tour_id" type="hidden"  value="{tour_id}">
			   <input name="hotel_id" type="hidden"  value="{hotel_id}">
			   <input name="destination_id" type="hidden"  value="{destination_id}">
			   <input name="old_gallery_image" type="hidden"  value="{old_gallery_image}">
                  <table width="100%">
                    <tr> 
                      <td> 
                          <table width="100%" class="adminform">
						  	<tr><th colspan="2"></th></tr>
							<tr><td width="70">&nbsp;</td>
								<td class="text_error" align="center">{error_text}{error_admin}{successfully}</td>
							</tr>
                            <tr> 
                              <td align="left" valign="top" width="100" class="{class_title}"> 
                                {lbl_name}: <font color="red">*</font></td>
                              <td width="414"> <input class="field" name="gallery_name" type="text" size="50" maxlength="250" value="{gallery_name}" {type_vietnamese}>
                              </td>
                            </tr>
                            <tr> 
                              <td align="left" valign="top"> 
                                {lbl_image}:</td>
                              <td valign="middle"><input class="field" name="gallery_image" type="file" size="40" maxlength="100">   {has_image}</td>
                            </tr>
							<tr> 
                              <td width="132" align="left" valign="top" class="class_position">
                                {lbl_position}: <font color="red">*</font></td>
                              <td width="414" class="trbang"> <input class="field" name="gallery_position" type="text" size="4" maxlength="4" value="{gallery_position}" >
                              </td>
                            </tr>
							<tr> 
                              <td width="132" align="left" valign="top">
                               {lbl_active}:</td>
                              <td width="414" class="trbang"> 
							  <input name="gallery_isactive" value="1" {ChkActive} type="checkbox" class="field">
                               </td>
                            </tr>
                          </table>
					</td>
                    </tr>
					<tr><td><br></td></tr>
					<tr><td colspan="2"> 
						<div id="err" style="display:none">
						<table width="100%" align="center">
							<tr><td class="text_error">Bạn phải nhập tất cả các trường có sao đỏ<br />
							<div id="err_string"></div></td></tr>
							<tr><td>
								<iframe name="fr_submit" width="0" height="0" style="visibility:hidden"></iframe>
							</td></tr>
						</table>
						</div>	
					</td></tr>
					<tr> 
					  <td colspan="2" align="center" valign="top">
					   <input type="button" class="button" value="{lbl_save}" name="save" onClick="javascript: check_form('save');">&nbsp;
					   <input type="button" class="button" value="{lbl_save_add}" name="add" onClick="javascript: check_form('add');">
						&nbsp;<input  type="button" class="button" value="{lbl_cancel}" onclick = "javascript: location.href='gallery.php?tour_id={tour_id}&hotel_id={hotel_id}&destination_id={destination_id}';"> 
					  </td>
					</tr>
					<tr class="menubar"> 
                      <td height="20" colspan="7" align="center"> 
                      <input type="button" name="Button" value="{lbl_close}" onClick="javascript:window.close();"class="button">
                      </td>
                    </tr>
                  </table>
                 </form>                  
                </td>
              </tr>
            </table>
            </td>
        </tr>
      </table></td>
  </tr>
</table>
</BODY>
</HTML>
<!-- END: MAIN -->